﻿using System.Globalization;
using System;
using System.Runtime.Serialization;

namespace Conducido.BizTalkOppSvc.Services.Contracts.Exceptions
{
    [Serializable]
    public class BizTalkQueryUnexpectedException : Exception
    {
        public BizTalkQueryUnexpectedException() : base(Exceptions.GetErrorDescription(0x31ceb))
        {
        }

        public BizTalkQueryUnexpectedException(int err) : base(string.Format(CultureInfo.CurrentCulture, "Error {0}: {1}", new object[] { err, Exceptions.GetErrorDescription(err) }))
        {
        }

        public BizTalkQueryUnexpectedException(string message) : base(message)
        {
        }

        public BizTalkQueryUnexpectedException(int err, params object[] args) : base(string.Format(CultureInfo.CurrentCulture, "Error {0}: {1}", new object[] { err, string.Format(CultureInfo.CurrentCulture, Exceptions.GetErrorDescription(err), args) }))
        {
        }

        public BizTalkQueryUnexpectedException(int err, Exception ex) : base(string.Format(CultureInfo.CurrentCulture, "Error {0}: {1}", new object[] { err, string.Format(CultureInfo.CurrentCulture, Exceptions.GetErrorDescription(err), new object[0]) }), ex)
        {
        }

        protected BizTalkQueryUnexpectedException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext)
        {
        }

        public BizTalkQueryUnexpectedException(string message, Exception ex) : base(message, ex)
        {
        }

        public BizTalkQueryUnexpectedException(string message, params object[] args) : base(string.Format(CultureInfo.CurrentCulture, message, args), null)
        {
        }

        public BizTalkQueryUnexpectedException(int err, Exception ex, params object[] args) : base(string.Format(CultureInfo.CurrentCulture, "Error {0}: {1}", new object[] { err, string.Format(CultureInfo.CurrentCulture, Exceptions.GetErrorDescription(err), args) }), ex)
        {
        }

        public string Message
        {
            get
            {
                return base.Message;
            }
        }

        public string Source
        {
            get
            {
                return base.Source;
            }
            set
            {
                base.Source = value;
            }
        }
    }
}

